create table t1 (c1 int);
create table t2 (c1 int);
create table t3 (c1 int);
lock tables t1 write, t2 write, t3 write;
drop table t2, t3, t1;
create table t1 (c1 int);
create table t2 (c1 int);
create table t3 (c1 int);
lock tables t1 write, t2 write, t3 write, t1 as t4 read;
alter table t2 add column c2 int;
drop table t1, t2, t3;
create table t1 ( a int(11) not null auto_increment, primary key(a));
create table t2 ( a int(11) not null auto_increment, primary key(a));
lock tables t1 write, t2 read;
delete from t1 using t1,t2 where t1.a=t2.a;
delete t1 from t1,t2 where t1.a=t2.a;
delete from t2 using t1,t2 where t1.a=t2.a;
delete t2 from t1,t2 where t1.a=t2.a;
drop table t1,t2;
unlock tables;
drop table t2,t1;
create table t1 (a int);
lock table t1 write;
flush tables with read lock;
unlock tables;
drop table t1;
CREATE TABLE t1 (i INT);
LOCK TABLES mysql.time_zone READ, mysql.time_zone_name READ, t1 READ;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone READ, mysql.time_zone_name READ, t1 WRITE;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone READ, mysql.time_zone_name READ;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone WRITE, mysql.time_zone_name WRITE;
UNLOCK TABLES;
LOCK TABLES mysql.time_zone READ, mysql.time_zone_name WRITE, t1 READ;
LOCK TABLES mysql.time_zone WRITE, mysql.time_zone_name WRITE, t1 READ;
LOCK TABLES mysql.time_zone WRITE, mysql.time_zone_name WRITE, t1 WRITE;
LOCK TABLES mysql.time_zone READ, mysql.time_zone_name WRITE;
DROP TABLE t1;
drop view if exists v_bug5719;
drop table if exists t1, t2, t3;
create table t1 (a int);
create temporary table t2 (a int);
create table t3 (a int);
create view v_bug5719 as select 1;
lock table v_bug5719 write;
select * from t1;
select * from t2;
select * from t3;
select * from v_bug5719;
drop view v_bug5719;
select * from t1;
unlock tables;
create or replace view v_bug5719 as select * from t1;
lock tables v_bug5719 write;
select * from v_bug5719;
select * from t1;
select * from t2;
select * from t3;
drop table t1;
select * from v_bug5719;
unlock tables;
create table t1 (a int);
lock tables t1 write, v_bug5719 write;
drop table t1;
select * from t3;
select * from v_bug5719;
unlock tables;
drop view v_bug5719;
create view v_bug5719 as select * from t2;
drop table t2, t3;
CREATE TABLE t1 ( table1_rowid SMALLINT NOT NULL );
CREATE TABLE t2 ( table2_rowid SMALLINT NOT NULL );
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
LOCK TABLES t1 WRITE, t2 READ;
DELETE FROM t1  WHERE EXISTS  (  SELECT 'x'  FROM t2 WHERE t1.table1_rowid = t2.table2_rowid ) ;
SELECT * FROM t1 WHERE 1 IN (SELECT * FROM t2 FOR UPDATE);
UNLOCK TABLES;
DROP TABLE t1,t2;
create table t1 (a int);
create table t2 (a int);
lock table t1 write, t2 write;
create temporary table t1 (a int);
flush table t1;
drop temporary table t1;
select * from t1;
unlock tables;
drop table t1, t2;
drop table if exists t1;
drop view if exists v1;
create table t1 (c1 int);
create view v1 as select * from t1;
lock tables t1 write, v1 write;
flush table t1;
insert into t1 values (33);
flush table t1;
select * from t1;
unlock tables;
drop table t1;
drop view v1;
create table t1 (a int);
set autocommit= 0;
insert into t1 values (1);
lock table t1 write;
drop table t1;
create table t1 (a int);
begin;
insert into t1 values (1);
drop table t1;
drop tables if exists t1, t2;
drop view if exists v1;
drop function if exists f1;
create table t1 (i int);
create table t2 (j int);
create view v1 as select * from t2;
lock tables t1 write, v1 write;
flush table t2;
alter table t2 add column k int;
create trigger t2_bi before insert on t2 for each row set @a:=1;
repair table t2;
